package com.combetter.changxing.bindingconfig;

import android.databinding.BindingAdapter;

import com.combetter.changxing.adapter.HomeHeaderItem;
import com.combetter.changxing.ui.view.Banner.Banner;
import com.combetter.changxing.ui.view.loader.GlideImageLoader;

/**
 * Created by Mark.fan on 2018/5/30.
 */

public class BindingBannerConfig {

    @BindingAdapter({"bannerItem"})
    public static void setBannerItem(Banner banner, HomeHeaderItem item) {
        banner.setImages(item.getImages())
                .setBannerTitles(item.getTitles())
                .setImageLoader(GlideImageLoader.getInstance())
                .start();
    }
}
